package com.life.wd.mapper;

import com.github.pagehelper.Page;
import com.life.wd.dto.SupplierDTO;
import com.life.wd.entity.Supplier;
import com.life.wd.result.PageResult;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface SupplierMapper {

    /**
     * 根据邮箱查询供应商
     */
    Supplier getSupplierByEmail(String email);

    /**
     * 插入供应商
     */
    int insertSupplier(Supplier supplier);

    Page<Supplier> listSupplier(SupplierDTO supplier);

    boolean existsByEmail(String email);

    Supplier selectById(Integer id);

    void updateById(Supplier supplier);

    void deleteById(Integer id);

    Supplier getById(Integer supplierId);
}